]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Make folks optional
authorColin Walters <walters@verbum.org>
Tue, 19 Jun 2012 19:15:02 +0000 (15:15 -0400)
committerColin Walters <walters@verbum.org>
Tue, 19 Jun 2012 20:34:23 +0000 (16:34 -0400)
The dependency chain spirals out from folks->zeitgeist->xapian...and
I'm really not interested in pulling in all of that into the core
shell.

There is work on splitting out contact search into gnome-contacts; I'd
add a bug link but Bugzilla is down.

configure.ac
js/Makefile.am
js/misc/config.js.in
js/ui/overview.js
src/Makefile.am

index 0dee0dd9b390612b3a89b8c5f0ea243a3d77104c..d48801254fbec61815b1c21afeb54aa1be58d3c8 100644 (file)
@@ -77,12 +77,26 @@ STARTUP_NOTIFICATION_MIN_VERSION=0.11
 GCR_MIN_VERSION=3.3.90
 GNOME_DESKTOP_REQUIRED_VERSION=3.5.1
 
+AC_ARG_WITH(folks,
+            AS_HELP_STRING([--with-folks],
+                           [Enable folks support]),
+            [with_folks=$withval], [with_folks=yes])
+
+if test x${with_folks} = xyes; then
+  FOLKS_REQUIREMENT="folks >= $FOLKS_MIN_VERSION"
+  AC_DEFINE([HAVE_FOLKS], [1], [folks support])
+  AC_SUBST([HAVE_FOLKS],[1])
+else
+  FOLKS_REQUIREMENT=
+fi
+AM_CONDITIONAL(BUILD_WITH_FOLKS, test x${with_folks} = xyes)
+
 # Collect more than 20 libraries for a prize!
 PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
                               libxml-2.0
                                gtk+-3.0 >= $GTK_MIN_VERSION
                                atk-bridge-2.0
-                               folks >= $FOLKS_MIN_VERSION
+                              $FOLKS_REQUIREMENT
                                libmutter >= $MUTTER_MIN_VERSION
                                gjs-internals-1.0 >= $GJS_MIN_VERSION
                               libgnome-menu-3.0 $recorder_modules
index 00a15b7462998f9a55e021570768635c0da40235..fd0e925fa9326ebae95ca86df453104b35126ff5 100644 (file)
@@ -6,6 +6,7 @@ misc/config.js: misc/config.js.in Makefile
        [ -d $(@D) ] || $(mkdir_p) $(@D) ; \
        sed -e "s|[@]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \
            -e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
+           -e "s|[@]HAVE_FOLKS@|$(HAVE_FOLKS)|g" \
            -e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
            -e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
            -e "s|[@]datadir@|$(datadir)|g" \
index 9769104c41ca77a3b43cdd580c7cc9dc2b538fd4..33a7a54cda36925ab70436a191ccd317eb6ecc41 100644 (file)
@@ -6,6 +6,8 @@ const PACKAGE_NAME = '@PACKAGE_NAME@';
 const PACKAGE_VERSION = '@PACKAGE_VERSION@';
 /* 1 if gnome-bluetooth is available, 0 otherwise */
 const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
+/* 1 if folks is available, 0 otherwise */
+const HAVE_FOLKS = @HAVE_FOLKS@;
 /* gettext package */
 const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
 /* locale dir */
index 2690f08a46f7cdd752dee11ff2f87df96bb94e66..5221b58f85b56706ef185f7ebb7811395640f4b5 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
+const Config = imports.misc.config;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const Mainloop = imports.mainloop;
@@ -11,7 +12,7 @@ const Shell = imports.gi.Shell;
 const Gdk = imports.gi.Gdk;
 
 const AppDisplay = imports.ui.appDisplay;
-const ContactDisplay = imports.ui.contactDisplay;
+const ContactDisplay = Config.HAVE_FOLKS ? imports.ui.contactDisplay : null;
 const Dash = imports.ui.dash;
 const DND = imports.ui.dnd;
 const Main = imports.ui.main;
@@ -207,7 +208,8 @@ const Overview = new Lang.Class({
         this.addSearchProvider(new AppDisplay.AppSearchProvider());
         this.addSearchProvider(new AppDisplay.SettingsSearchProvider());
         this.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
-        this.addSearchProvider(new ContactDisplay.ContactSearchProvider());
+        if (ContactDisplay != null)
+            this.addSearchProvider(new ContactDisplay.ContactSearchProvider());
 
         // Load remote search providers provided by applications
         RemoteSearch.loadRemoteSearchProviders(Lang.bind(this, this.addSearchProvider));
index 05c8457a88fc53e319e9bbd5398e7b1803354086..a585cf8c0de81bca1c0f476e70c76c04efe5332c 100644 (file)
@@ -109,7 +109,6 @@ shell_public_headers_h =            \
        shell-app.h                     \
        shell-app-system.h              \
        shell-app-usage.h               \
-       shell-contact-system.h  \
        shell-embedded-window.h         \
        shell-generic-container.h       \
        shell-gtk-embed.h               \
@@ -132,6 +131,10 @@ shell_public_headers_h =           \
        shell-wm.h                      \
        shell-xfixes-cursor.h
 
+if BUILD_WITH_FOLKS
+shell_public_headers_h += shell-contact-system.h
+endif
+
 shell_private_sources = \
        gactionmuxer.h                  \
        gactionmuxer.c                  \
@@ -155,7 +158,6 @@ libgnome_shell_la_SOURCES =         \
        shell-app.c                     \
        shell-app-system.c              \
        shell-app-usage.c               \
-       shell-contact-system.c  \
        shell-embedded-window.c         \
        shell-generic-container.c       \
        shell-gtk-embed.c               \
@@ -185,6 +187,9 @@ libgnome_shell_la_SOURCES =         \
        shell-xfixes-cursor.c           \
        $(NULL)
 
+if BUILD_WITH_FOLKS
+libgnome_shell_la_SOURCES += shell-contact-system.c
+endif
 
 libgnome_shell_la_gir_sources = \
        $(filter-out %-private.h $(shell_private_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
@@ -301,7 +306,10 @@ libgnome_shell_la_LIBADD =         \
 libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
 
 Shell-0.1.gir: libgnome-shell.la St-1.0.gir
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0 Folks-0.6
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0
+if BUILD_WITH_FOLKS
+Shell_0_1_gir_INCLUDES += Folks-0.6
+endif
 Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
 Shell_0_1_gir_LIBS = libgnome-shell.la
 Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)